home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-0497 / AMOSLIST / text0087.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  1.9 KB  |  49 lines

  1.  
  2. Hello!
  3.  
  4.  > This very good file explains different ways to improve speed in your
  5.  > AMOS-programs.
  6.  
  7. Yes it is!! Thank you Ben!!!
  8.  
  9.  > However some of the tips really surprised me. Ben states that A=A+1
  10.  > should be faster than both Inc A and Add A,1. He also writes that
  11.  > Repeat ... Inc ... Until should be faster than For ... Next. I have
  12.  > been doing some tests on my system and it clearly proves that this
  13.  > is WRONG!
  14.  
  15. Well, you probably did your test from the amos editor, using the Amos
  16. interpreter and your tests are right. But if you try to compile your code,
  17. you'll see that Ben is right. It's strange but for example For Next is much
  18. faster (about 300%) than Repeat Until when interpreted, but far slower (about
  19. 50%) when compiled. So now, since you release all your software compiled,
  20. it's better using Repeat Until and A=A+1. Of course, sometimes you will still
  21. use For Next since it's easier to read, but limit it for small loops or where
  22. speed isn't important.
  23.  
  24.  > I can not believe that Ben Wyatt has not checked his tips, so I must
  25.  > conclude that the difference in speed is different on different system
  26.  
  27. I have got a 030 and Ben's tricks work well.
  28.  
  29. Bye
  30.  
  31.  
  32.     berionne@flashnet.it                        >>Bomb!2.0<<
  33.   +--------------------------ON AMINET----------------------------+
  34.   | game/think/VenusTris.lha         game/misc/SnailRace.lha      |
  35.   | game/shoot/fantasy.lha           util/time/MReminder.lha      |
  36.   | game/think/Atoms31.lha           util/misc/Dialer2.lha        |
  37.   | game/think/navalbattle.lha       game/think/Manos.lha         |
  38.   | game/shoot/in_the_target.lha     dev/lang/Logo1_4.lha         |
  39.   | gfx/show/PhotoCDAGA_GUI.lha      dev/lang/Logo1_4Eng.lha      |
  40.   +---------------------------------------------------------------+
  41.   |   BASIC programmers never die, they GOSUB and don't RETURN.   |
  42.   +---------------------------------------------------------------+
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.